﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fleck;

namespace PServiceBus.FleckWebSocket {
    public class FleckWebSocketConnection : PServiceBus.Core.Interface.IWebSocketConnection {

        IWebSocketConnection connection;
        public FleckWebSocketConnection(IWebSocketConnection conn) {
            connection = conn;
            ID = conn.ConnectionInfo.Id;
            ClientIpAddress = conn.ConnectionInfo.ClientIpAddress;
        }
        #region IWebSocketConnection Members

        public void Send(string message) {
            connection.Send(message);
        }

        public void Close() {
            connection.Close();
        }

        public Guid ID { get; set; }

        public string ClientIpAddress { get; set; }
        #endregion
    }
}
